package com.example.demo.controller;

import java.util.concurrent.atomic.AtomicLong;

import com.example.demo.service.UserService;
import com.example.demo.util.Util;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestComponentInvodeController {
  @Autowired
  private UserService userService;
  
  private AtomicLong atomicLong = new AtomicLong(1L);
  
  @RequestMapping({"/invokeConponent"})
  @ResponseBody
  public void invokeComponent(@Param("param") String param) throws Exception {
    String url = "http://" + param;
    System.out.println("[InvokeConponent] componentUrl: " + url);
    String ret = Util.sendGet(url, "");
    System.out.println(ret);
  }
}